Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix redis test #15247

Merged
merged 1 commit into from
Aug 22, 2022
Merged

Fix redis test #15247

merged 1 commit into from
Aug 22, 2022

Conversation

DeepthiYV
Copy link
Contributor

@DeepthiYV DeepthiYV commented Jul 19, 2022

@DeepthiYV DeepthiYV force-pushed the redis branch 3 times, most recently from e9f5c96 to 4f64f8a Compare July 27, 2022 06:58
@DeepthiYV DeepthiYV force-pushed the redis branch 2 times, most recently from 5915da9 to dd70013 Compare July 27, 2022 09:29
@DeepthiYV DeepthiYV force-pushed the redis branch 4 times, most recently from b9e035a to 29b5a6d Compare August 8, 2022 06:41
@DeepthiYV DeepthiYV changed the title [WIP] Fix redis test Fix redis test Aug 8, 2022
Comment on lines 46 to 47
# Connect to the new instance of redis-server with port 6380 and make 6380 instance
#a replica of redis instance running on port 6379 and verify the reslt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor comments:

and make 6380 -> delete the blank

verify the reslt -> result?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correction is done. Thanks for the heads up

sub run_script {
my $script = shift;
my $logfile = "output.txt";
record_info($script, "Running python script: $script");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, it should be a shell script, but please omit my comment if I am wrong

echo "redis-cli info replication on master"
else
echo "Failed: redis-cli info replication on master"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete this line

echo "Role:slave in redis-cli on replica"
else
echo "Failed: redis-cli info replication on replica"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete this line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleted. Thanks Richard

@DeepthiYV DeepthiYV force-pushed the redis branch 2 times, most recently from e2336fc to 22220d2 Compare August 8, 2022 11:32
then
echo "redis-cli info replication on master"
else
echo "Failed: redis-cli info replication on master"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
echo "Failed: redis-cli info replication on master"
echo "Failed: redis-cli info replication on master, slave took longer than 10 seconds to show up"

Comment on lines +73 to +80
out=$(redis-cli -p 6380 HMGET "movie:343" title)
if [ "$out" = "Spider-Man" ]
then
echo "redis-cli replicaof done"
else
echo "Failed: redis-cli replication on replica "
exit 1
fi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you create a follow up ticket to rework this in the future?, i.e: add an extra check to know the status of the replication (basically, know if the replica is in sync with the master)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@foursixnine foursixnine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from the niptick of one of the messages, everything looks good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants